﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace EasyMvc.Config
{
    public class Setting : ConfigFileBase
    {
        public Setting()
        {
            this.PortalSetting = new PortalSetting();
        }
        
        public PortalSetting PortalSetting { get; set; }
    }

    public class PortalSetting : ConfigNodeBase
    {
        /// <summary>
        ///  网站名称
        /// </summary>
        [DisplayName("网站名称")]
        [Required(ErrorMessage = "名称不能为空")]
        [StringLength(50, ErrorMessage = "长度不能超过50")]
        public override string Name { get; set; }
        /// <summary>
        /// 网站标题
        /// </summary>
        [DisplayName("网站标题")]
        [Required(ErrorMessage = "网站标题不能为空")]
        [StringLength(50, ErrorMessage = "长度不能超过50")]
        public string Title { get; set; }
        /// <summary>
        /// 网站联系EMAIL
        /// </summary>
        [DisplayName("EMAIL")]
        public string Email { get; set; }
        /// <summary>
        /// 网站公告
        /// </summary>
        [DisplayName("网站公告")]
        public string Announcement { get; set; }
        /// <summary>
        /// 底部版权信息
        /// </summary>
        [DisplayName("版权信息")]
        public string Copyright { get; set; }
    }
}